﻿using System.ComponentModel;
using System.Device.Location;
using WazePocWP8.Server;

namespace FastestWays.Model
{
    public class Address : INotifyPropertyChanged
    {
        private string _addressPhrase;
        private GeoCoordinate _geocoordinate;
        private string _currentCountry;

        public string AddressPhrase
        {
            get { return _addressPhrase; }
            set
            {
                _addressPhrase = value;
                RaisePropertyChanged("AddressPhrase");
            }
        }

        public GeoCoordinate Geocoordinate
        {
            get { return _geocoordinate; }
            set
            {
                _geocoordinate = value;
                RaisePropertyChanged("Geocoordinate");
            }
        }

        public string CurrentCountry
        {
            get { return _currentCountry; }
            set
            {
                _currentCountry = value;
                RaisePropertyChanged("CurrentCountry");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        protected void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
